/*

    tools23d - tools for converting images to 3D formats.
    Copyright (C) 2014  Dave Gorst

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/

#ifndef UTIL_H_INCLUDED
#define UTIL_H_INCLUDED

#define YES_CHAR 'y'
#define NO_CHAR 'n'
#define ALWAYS_CHAR 'a'

#define MAX_PRECISION 5

#ifndef MAX_PATH
	#define MAX_PATH 32768
#endif

void T3D_OutputMessage (char *, ...);
void T3D_OutputError (char *, ...);
BOOL T3D_RaiseWarning (BOOL *, char *, ...);

BOOL T3D_ConvertXYToInts (char *, unsigned int *, unsigned int *);
BOOL T3D_IsNumeric (char *);
unsigned int T3D_WriteNumber (unsigned int, char *, BOOL, unsigned int);
char * T3D_ProcessWriteFilename (char *, unsigned int, time_t);

/* Sort functions */

int T3D_CompareStrings (const void *, const void *);
int T3D_CompareTimestamps (const void *, const void *);

#endif
